<!DOCTYPE html>
<html lang="en" style="background: #fff">
<head>
    <meta charset="utf-8"/>
    <title>RoubSite后台管理</title>
    <meta name="keywords" content=""/>
    <meta name="description" content=""/>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <script src="{$__WEBPATH__}/static/common/js/roubSite.js"></script>
    <script type="text/javascript">RS.webPath = '{$__WEBPATH__}';</script>
    <script src="{$__WEBPATH__}/static/common/js/import.js"></script>
</head>
<body>
<!--主要内容begin-->
<script>
    var retInfo = {$retInfo};
</script>
<script>
    var method = '{$method}';
</script>
<script src="{$__WEBPATH__}/static/admin/rsMenu/js/editRsMenu.js"></script>
<div class="layui-container">
    <div class="layui-row">
        <div class="layui-col-md12">
            <form class="layui-form" id='editForm' onsubmit="return false;" lay-filter='editForm'>
                <input type="text" class="form-control" id="menuId" name="menuId" placeholder="菜单id"
                       style="display: none">
                <div class="layui-row layui-col-space10">
                    <div class="layui-col-xs4">
                        <label for="menuName" class="layui-form-label">菜单名称</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input" id="menuName" name="menuName" placeholder="菜单名称">
                        </div>
                    </div>
                    <div class="layui-col-xs4">
                        <label for="parentId" class="layui-form-label">上级菜单</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input" id="parentId" name="parentId" placeholder="上级菜单"
                                   style="display: none" value="{$pid}">
                            <input type="text" class="layui-input" id="parentName" value='{$parentName}'
                                   placeholder="上级菜单" readonly="readonly" onclick="selectParent()">
                        </div>
                    </div>
                </div>
                <div class="layui-row layui-col-space10">
                    <div class="layui-col-xs8">
                        <label for="orderId" class="layui-form-label">菜单链接</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input" id="menuUrl" name="menuUrl" placeholder="菜单链接">
                        </div>
                    </div>
                </div>
                <div class="layui-row layui-col-space10">
                    <div class="layui-col-xs4">
                        <label for="menuIcon" class="layui-form-label">是否显示</label>
                        <div class="layui-input-block">
                            <select name="isShow">
                                <option value="1" selected>显示</option>
                                <option value="0">隐藏</option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-col-xs4">
                        <label for="orderId" class="layui-form-label">排序号</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input" id="orderId" name="orderId" placeholder="排序号">
                        </div>
                    </div>
                </div>
                <div class="layui-row layui-col-space10">
                    <div class="layui-col-xs8">
                        <label for="menuIcon" class="layui-form-label">菜单图标</label>
                        <div class="layui-input-block">
                            <input type="text" id="menuIcon" name="menuIcon" lay-filter="menuIcon"
                                   style="display: none;">
                        </div>
                    </div>
                </div>
                <div class="layui-row layui-col-space10">
                    <div class="layui-input-block">
                        <button type="submit" class="layui-btn" onclick="save()">提交</button>
                        <button type="submit" class="layui-btn layui-btn-danger" onclick="history.back();">返回</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script type="text/javascript">
    var iconPicker;
    layui.config({
        base: RS.webPath + '/static/common/layuiadmin/' //静态资源所在路径
    }).extend({
        iconPicker: 'modules/iconPicker/iconPicker' //主入口模块
    });
    layui.use(['iconPicker'], function () {
        iconPicker = layui.iconPicker;
        iconPicker.render({
            // 选择器，推荐使用input
            elem: '#menuIcon',
            // 数据类型：fontClass/unicode，推荐使用fontClass
            type: 'fontClass',
            // 是否开启搜索：true/false，默认true
            search: true,
            // 是否开启分页：true/false，默认true
            page: true,
            // 每页显示数量，默认12
            limit: 16,
            // 每个图标格子的宽度：'43px'或'20%'
            cellWidth: '43px',
            // 点击回调
            click: function (data) {
            },
            // 渲染成功后的回调
            success: function (d) {
            }
        });
        $(function () {
            iconPicker.checkIcon('menuIcon', $('#menuIcon').val());
        });
    });
</script>
<!--主要内容end-->
</body>
</html>
